#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <sys/types.h>
#include <fcntl.h>

main() {

    int fd = open("random_text", O_RDWR | O_CREAT, 0755);

    if (fd < 0)
    {
        printf("ERROR!\n");
        exit(1);
    }

    char *writeThis = "\n..conten";

    lseek(fd, 0, SEEK_SET);

    write(fd, writeThis, strlen(writeThis));

    close(fd);
    return 0;
}